%header.navbar.navbar-static-top.navbar-gitlab
  .navbar-inner
    .container
      %div.app_logo
        %span.separator
        = link_to root_path, class: "home has_bottom_tooltip", title: "控制台" do
          %h1 GITLAB
        %span.separator
      %h1.project_name= title
      %ul.nav
        %li
          %a
            %div.hide.turbolink-spinner
              %i.icon-refresh.icon-spin
              加载中 ...
        %li
          = render "layouts/search"
        %li
          = link_to public_root_path, title: "公共区", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do
            %i.icon-globe
        %li
          = link_to user_snippets_path(current_user), title: "我的代码片段", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do
            %i.icon-paste
        - if current_user.is_admin?
          %li
            = link_to admin_root_path, title: "管理面板", class: 'has_bottom_tooltip', 'data-original-title' => 'Admin area' do
              %i.icon-cogs
        - if current_user.can_create_project?
          %li
            = link_to new_project_path, title: "新建项目", class: 'has_bottom_tooltip', 'data-original-title' => 'New project'  do
              %i.icon-plus
        %li
          = link_to profile_path, title: "我的资料", class: 'has_bottom_tooltip', 'data-original-title' => 'My profile'  do
            %i.icon-user
        %li
          = link_to destroy_user_session_path, class: "logout", method: :delete, title: "退出", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout'  do
            %i.icon-signout
        %li
          = link_to current_user, class: "profile-pic", id: 'profile-pic' do
            = image_tag gravatar_icon(current_user.email, 26), alt: ''
